// pages/classDetail/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    url:'',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    const vm = this;
    //设置的当前页面标题
    if (options.className) {
      wx.setNavigationBarTitle({ title: options.className })
    } else {
      options.className = '标题为空'
    }
    console.log(options);
    // vm.setData({url:'https://www.bchzh.xin/hzmobilework/upload/201811/21/ac19b7dc99ca42eeb7b0c57ea4d9eabd_.mp4'})
    vm.setData({url:options.url})
    return;
    wx.downloadFile({
      url: options.url,
      success(res) {
        var tempFilePath = res.tempFilePath;
        wx.openDocument({
          filePath: tempFilePath
        })
      }
    })
  }
})